package com.tdk.wifidirectserver.socket.server

import com.tdk.wifidirectserver.socket.client.Client

/**
 * 服务端接口,用于服务端设置回调
 */
interface IServerAction {
    /**
     * Send data.
     *
     * @param data the data
     * @param ip   the ip
     */
    fun sendData(data: ByteArray?, client: Client)

    /**
     * Broadcast data.
     *
     * @param data the data
     */
    fun broadcastData(data: ByteArray?)

    /**
     * Close client by ip
     *
     * @param ip the ip
     */
    fun closeClient(client: Client)

    /**
     * 关闭服务端
     */
    fun closeServer()
}